package com.fr.cell.core;

import com.fr.cell.GridSelection;
import com.fr.cell.JWorkBook;
import java.io.Serializable;
import javax.swing.JScrollBar;

public class ReportPaneEditState
  implements Serializable
{
  private GridSelection gridSelection = new GridSelection();
  private int verticalValue = 0;
  private int horizontalValue = 0;

  public GridSelection getGridSelection()
  {
    return this.gridSelection;
  }

  public void setGridSelection(GridSelection paramGridSelection)
  {
    this.gridSelection = paramGridSelection;
  }

  public int getVerticalValue()
  {
    return this.verticalValue;
  }

  public void setVerticalValue(int paramInt)
  {
    this.verticalValue = paramInt;
  }

  public int getHorizontalValue()
  {
    return this.horizontalValue;
  }

  public void setHorizontalValue(int paramInt)
  {
    this.horizontalValue = paramInt;
  }

  public void backupJWorkBook(JWorkBook paramJWorkBook)
  {
    setGridSelection(paramJWorkBook.getGridSelection());
    paramJWorkBook.fireGridSelectionChanged();
    setVerticalValue(paramJWorkBook.getVerticalScrollBar().getValue());
    setHorizontalValue(paramJWorkBook.getHorizontalScrollBar().getValue());
  }

  public void popupJWorkBook(JWorkBook paramJWorkBook)
  {
    paramJWorkBook.setGridSelection(getGridSelection());
    paramJWorkBook.getVerticalScrollBar().setValue(getVerticalValue());
    paramJWorkBook.getHorizontalScrollBar().setValue(getHorizontalValue());
  }
}